
package com.welsy.user.control
{
	import com.adobe.cairngorm.control.FrontController;
	import com.welsy.user.command.GetCourseTrackCommand;
	import com.welsy.user.command.GetIterElementsFromIterCommand;
	import com.welsy.user.command.WhoAmICommand;	
	import com.welsy.user.event.WhoAmIEvent;
	import com.welsy.user.event.GetCourseTrackEvent;
	import com.welsy.user.command.GetCourseTrackCommand;
	import com.welsy.user.event.GetUserItersEvent;
	import com.welsy.user.command.GetUserItersCommand;
	import com.welsy.user.command.GetUserPendingCoursesCommand;
	import com.welsy.user.command.WhoAmICommand;
	import com.welsy.user.event.GetCourseTrackEvent;
	import com.welsy.user.event.GetIterElementsFromIterEvent;
	import com.welsy.user.event.GetUserItersEvent;
	import com.welsy.user.event.GetUserPendingCoursesEvent;
	import com.welsy.user.event.WhoAmIEvent;
	import com.welsy.user.event.GetUserCreditsEvent;
	import com.welsy.user.command.WhoAmICommand;
	import com.welsy.user.event.GetIterCreditsEvent;
	import com.welsy.iter.command.GetIterCommand;
	import com.welsy.user.command.GetIterCreditsCommand;
	import com.welsy.user.event.GetIterUserResultEvent;
	import com.welsy.user.command.GetIterUserResultCommand;
	import com.welsy.user.event.SaveElementTrackEvent;
	import com.welsy.user.command.SaveElementTrackCommand;
	import com.welsy.user.event.GetTestTrackEvent;
	import com.welsy.user.command.GetTestTrackCommand;
	import com.welsy.user.command.GetUserCreditsCommand;
	import com.welsy.authoring.event.SaveQuestionResponseEvent;
	import com.welsy.authoring.command.SaveQuestionResponseCommand;
	import com.welsy.authoring.command.GetFinalResultCommand;
	import com.welsy.authoring.event.GetFinalResultEvent;
	import com.welsy.user.event.SaveQuestionTrackEvent;
	import com.welsy.user.command.SaveQuestionTrackCommand;
	import com.welsy.user.event.SaveIterElementTrackEvent;
	import com.welsy.user.command.SaveIterElementTrackCommand;
	import com.welsy.iter.event.ClearExecuteEvent;
	import com.welsy.iter.command.ClearExecuteCommand;
	import com.welsy.user.event.GetNewsEvent;
	import com.welsy.user.command.GetNewsCommand;		
	
	/**
	 * @version	$Revision: 1.1 $
	 */
	public class MainController extends FrontController
	{
		public function MainController()
		{
			initialiseCommands();
		}
		
		public function initialiseCommands() : void
		{
			addCommand( WhoAmIEvent.EVENT_WHOAMI, WhoAmICommand );
			addCommand( GetCourseTrackEvent.EVENT_GET_COURSE_TRACK, GetCourseTrackCommand );
			addCommand( GetUserItersEvent.EVENT_GETUSERITERS, GetUserItersCommand );
			addCommand( GetUserPendingCoursesEvent.EVENT_GETUSERPENDINGCOURSES, GetUserPendingCoursesCommand );
			addCommand( GetIterElementsFromIterEvent.EVENT_GETITERELEMENTSFROMITER, GetIterElementsFromIterCommand);
			addCommand( GetUserCreditsEvent.EVENT_GETUSERCREDITS, GetUserCreditsCommand );
			addCommand( GetIterCreditsEvent.EVENT_GETITERCREDITSEVENT, GetIterCreditsCommand );
			addCommand( GetIterUserResultEvent.EVENT_GETITERUSERRESULT, GetIterUserResultCommand );
			addCommand( SaveIterElementTrackEvent.EVENT_SAVE_TRACK_ITERELEMENT, SaveIterElementTrackCommand);
			addCommand( SaveElementTrackEvent.EVENT_SAVE_TRACK_ELEMENT, SaveElementTrackCommand);
			addCommand( SaveQuestionTrackEvent.EVENT_SAVE_TRACK_QUESTION, SaveQuestionTrackCommand);
			addCommand( GetTestTrackEvent.EVENT_GET_TEST_TRACK, GetTestTrackCommand );
			addCommand( GetFinalResultEvent.EVENT_GETFINALRESULT, GetFinalResultCommand );
			addCommand( SaveQuestionResponseEvent.EVENT_SAVEQUESTIONRESPONSE, SaveQuestionResponseCommand );
			addCommand( ClearExecuteEvent.EVENT_CLEAR_EXECUTE, ClearExecuteCommand );
			addCommand( GetNewsEvent.EVENT_GETNEWS, GetNewsCommand );			
		}	
	}
}